package com.kssoft.ebd.controller;

import com.kssoft.ebd.common.Broadcast;
import com.kssoft.ebd.service.XydBroadcastService;
import com.kssoft.ebd.spider.common.PageModelType;
import org.openqa.selenium.WebDriver;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.ConcurrentHashMap;

@RestController
@RequestMapping("xydBroadcast")
public class XydBroadcastController {

    @Autowired
    private XydBroadcastService xydBroadcastService;

    @RequestMapping("/startBroadcast")
    public String startBroadcastPage(@RequestBody Broadcast  broadcast) {
        return xydBroadcastService.startBroadcast(broadcast);
    }
    /**
     * closeBroadcastPage
     */
    @RequestMapping("/closeBroadcast")
    public String closeBroadcastPage(@RequestBody Broadcast  broadcast) {
        return xydBroadcastService.closeBroadcast(broadcast);
    }

}
